package com.liuzh.fitnessplan.tools

import android.content.Context
import android.content.SharedPreferences

class AppDataInfo {
    companion object{
        val instance : AppDataInfo by lazy { AppDataInfo() }
    }

    fun getId(context: Context) : Int{
        return context.getSharedPreferences("appInfo",Context.MODE_PRIVATE).getInt("userId",0)
    }

    fun getSharedPreference(context: Context): SharedPreferences{
        return context.getSharedPreferences("appInfo", Context.MODE_PRIVATE)
    }
}